class UserD {
    name:string = "asda";
    age:number;
    sex:string;

    constructor(name:string,age:number,sex:string){
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    say(){
        console.log(this.name,this.age,this.sex);
    }
}

var user1:UserD = new UserD("aaa",111,"m");